package com.shtel.customerInfo.mapper;

import com.shtel.customerInfo.entity.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface QueryMapper {

    //查询客户基本信息
    @Select("select * from custinfo where creditnum=#{creditnum}")
    public CustInfo queryCustInfo(@Param("creditnum") String creditnum);

    //查询客户经理信息
    @Select("select * from ceoinfo where ceonumber=#{ceonumber}")
    public CeoInfo queryceoinfo(@Param("ceonumber") String ceonumber);

    //查询客户经理团队信息
    @Select("select * from ceoinfo where ceogroupid=#{ceogroupid}")
    public List<CeoInfo> queryceoinfos(@Param("ceogroupid") String ceogroupid);

    //查询政企客户信息
    @Select("select * from govcustinfo where govid=#{govid}")
    public GovCustInfo querygovcustinfo(@Param("govid") String govid);

    //查询政企经理
    @Select("select * from govceoinfo where govid=#{govid}")
    public List<GovCeoInfo> queryGovCeoInfos (@Param("govid") String govid);

    //查询星级相关
    @Select("select * from starandscore where creditnum = #{creditnum}")
    public StarAndScore querystarandscore(@Param("creditnum") String creditnum);

}
